package Bean;


#
# Put "require" statements in for all required,imported packages
#

require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(setBeanType);

#
# Just add code here
#


sub new {
  my $type = shift;
  my $this = {};
  $this->{'Bean'} = 'Colombian';
  bless $this, $type;
  return $this;
}
#sub new {
#  my $this = {}; # Create an anonymous hash, and #self points to it.
#  bless $this; # Connect the hash to the package Cocoa.
#  return $this; # Return the reference to the hash.
#}
#
# This subroutine sets the class name
sub setBeanType{
  my ($class, $name) = @_;
  $class->{'Bean'} = $name;
  print "Set bean to $name \n";
}

sub nameLister {
     my $this = shift;
     my ($keys ,$value );
     while (($key, $value) = each (%$this)) {
         print "\t$key is $value.\n";
     }
 }
 
sub printType {
  my $class = shift @_;
  print "The type of Bean is $class->{'Bean'} \n";
}

1; # terminate the package with the required 1;
